package com.nhncorp.pleiades.client;

import java.util.List;

public interface EventService {
  
  /** Event types client can register for. */
  public static enum Events {
    SPACE_WRITE,   
    SPACE_TAKE,
    SPACE_SUBSCRIBE,
    SPACE_UNSUBSCRIBE
  }  
  
  /** Write single object to pleiades space */    
  public boolean writeEntry(SpaceEntry entry);
  
  /** Write multiple Objects to pleiades space */
  public boolean writeEntry(List<SpaceEntry> entryList);
  
  /** Copy multiple objects from pleiades Space */
  public SpaceEntry[] readEntry(SpaceEntry entry, int maxCount, int timeOut);
  
  /** Copy multiple objects from pleiades space and then remove them*/
  public SpaceEntry[] takeEntry(SpaceEntry entry, int maxCount, int timeOut);
  
  /** Register interesting events to pleiades*/
  public boolean subscribe(Subscription subscription);
  
  /** Unregister the events previously subscribed to pleiades*/
  public boolean unSubscribe(Subscription subscription);
  
  
}
